observations
Class Phenomenon

java.lang.Object
  extended byobservations.DomainObject
      extended byobservations.Phenomenon
All Implemented Interfaces:
DomainInterface
Direct Known Subclasses:
NullPhenomenon

public class Phenomenon
extends DomainObject

Phenomenon Is a particular phenomenon like 'high' or 'obese'. It is part of Fowler's pattern 'Observation'. Each phenomenon is a value for some phenomenon type.

Version:
2004-09-10
Author:
Sascha Hemminger
See Also:
PhenomenonType

Constructor Summary
Phenomenon()
          Default constructor for phenomenon.
Phenomenon(java.lang.String name)
          Constructs a new phenomenon object.
Phenomenon(java.lang.String name, PhenomenonType type)
          Constructs a new phenomenon object with a particular type.
 
Method Summary
static Phenomenon get(java.lang.String name)
          Use this to search a phenomenon by name.
 java.lang.String getName()
          Gives the phenomenon's name.
 PhenomenonType getPhenomenonType()
          Gives the type for the phenomenon.
 boolean includes(Quantity arg)
          Tests whether the quantity is included in the phenomenon's range.
 Phenomenon persist()
          Saves the phenomenon.
 void setRange(QuantityRange arg)
          Sets the range of the phenomenon eg. '80 mm/Hg - 120 mm/Hg'.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Phenomenon

public Phenomenon()
Default constructor for phenomenon.

See Also:
DomainObject.DomainObject()

Phenomenon

public Phenomenon(java.lang.String name)
Constructs a new phenomenon object.

Parameters:
name - the name of the phenomenon
See Also:
DomainObject.DomainObject(String)

Phenomenon

public Phenomenon(java.lang.String name,
                  PhenomenonType type)
Constructs a new phenomenon object with a particular type.

Parameters:
name - the name of the phenomenon
type - the phenomenon type for the phenomenon
See Also:
DomainObject.DomainObject(String)
Method Detail

get

public static Phenomenon get(java.lang.String name)
Use this to search a phenomenon by name.

Parameters:
name - name of the phenomenon to search
Returns:
the found phenomenon

getName

public java.lang.String getName()
Gives the phenomenon's name.

Specified by:
getName in interface DomainInterface
Overrides:
getName in class DomainObject
Returns:
name of phenomenon
See Also:
DomainObject.getName()

getPhenomenonType

public PhenomenonType getPhenomenonType()
Gives the type for the phenomenon.

Returns:
particular type of this phenomenon

includes

public boolean includes(Quantity arg)
Tests whether the quantity is included in the phenomenon's range.

Parameters:
arg - quantity to test
Returns:
true if the quantity is included in the phenomenon's quantity range

persist

public Phenomenon persist()
Saves the phenomenon.

Returns:
the phenomenon

setRange

public void setRange(QuantityRange arg)
Sets the range of the phenomenon eg. '80 mm/Hg - 120 mm/Hg'.

Parameters:
arg - the range of the phenomenon